package com.amox.uitest.adapter;

import java.util.List;

import org.dom4j.Element;

import com.amox.uitest.common.KeyWord;
import com.amox.uitest.tcase.BaseTestCase;

public class FinallyAdapter extends BaseAdapter<Boolean> {
	public FinallyAdapter(BaseTestCase uitest) {
		super(uitest);
	}
	
	@Override
	public Boolean adapter(Element element) throws Exception {
		List<Element> elements = element.elements();
		for(Element cmdEle : elements) {
			if(KeyWord.exception.toString().equals(cmdEle.getName())
				|| KeyWord.finaly.toString().equals(cmdEle.getName())) {
				continue ;
			}
			
			execElement(cmdEle);
		}
		return true;
	}
}
